public class Max {
    public static void main(String[] args) {
        int a = 2, b = 6, c = 5;
        int max = Compare.max3(a, b, c);
        System.out.println("最大的是" + max);
    }
}

class Compare {
    public static int max2(int a, int b) {
        return a > b ? a : b;
    }

    public static int max3(int a, int b, int c) {
        return (max2(a, b) > c) ? (max2(a, b)) : c;
    }
}